package com.tuling.netty.server;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

@Component
public class NettyServerStart implements InitializingBean {
    @Override
    public void afterPropertiesSet() throws Exception {
        new Thread(() -> {
            try {
                new NettyServer(9876).run();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }).start();
    }
}
